import request from "@/utils/request";
import { AxiosPromise } from "axios";
import { SysDescQuery, SysDescPageVO, SysDescForm } from "./types";

export function getSysDescPage(
  queryParams: SysDescQuery
): AxiosPromise<PageResult<SysDescPageVO[]>> {
  return request({
    url: "/api/car/template/page",
    method: "get",
    params: queryParams,
  });
}

export function saveSysDesc(data: SysDescForm) {
  return request({
    url: "/api/car/template/saveSysDesc",
    method: "put",
    data: data,
  });
}

/**
 * 删除
 *
 * @param ids
 */
export function deleteSysDesc(ids: string) {
  return request({
    url: "/api/car/template/" + ids,
    method: "delete",
  });
}
